<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
    <link href="css/style.css" rel="stylesheet"/>
    <link href="css/base.css" rel="stylesheet"/>
    <script src="js/jquery1.42.min.js" type="text/javascript"></script>
    <script src="js/jquery.SuperSlide.2.1.3.js" type="text/javascript"></script>
    <script src="js/flexible.min.js" type="text/javascript"></script>
    <title><th>接口开关</th>
    </title>
</head>
<body >
<div class="layui-btn-group demoTable" style="margin-bottom: 10px;">
    <button class="layui-btn" data-type="parseTable">立即转化为数据表格</button>
</div>
<table lay-filter="parse-table-demo">
    <thead>
    <tr>
        <th lay-data="{field:'username', width:200}">接口</th>
        <th lay-data="{field:'joinTime', width:150}">状态</th>
        <th lay-data="{field:'sign', minWidth: 180}">修改</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td>易缴费</td>
        <td>开</td>
        <td>关</td>
    </tr>
    <tr>
        <td>闲卡网</td>
        <td>开</td>
        <td>关</td>d
    </tr>
    </tbody>
</table>
</body>
<script>
    $(function () {
        $.ajax({
            url:'/shop/interfaceSwitch',
            type:'POST', //GET
            async:true,    //或false,是否异步
            data:{
            },
            timeout:5000,    //超时时间
            dataType:'json',    //返回的数据格式：json/xml/html/script/jsonp/text
            beforeSend:function(xhr){
                /*console.log(xhr)
                 console.log('发送前')*/
            },
            success:function(reData){
                console.log(reData)

            },
        });

    })
</script>
</html>